package com.smmisia.shop.service;

import com.smmisia.common.Result.Result;
import com.smmisia.shop.entity.TradeOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.smmisia.shop.model.TradeOrderVO;
import com.smmisia.shop.model.dto.OrderStreamDTO;
import com.smmisia.shop.param.BuyParam;
import com.smmisia.shop.param.CancelParam;
import com.smmisia.shop.request.BaseOrderUpdateRequest;
import com.smmisia.shop.request.OrderCancelRequest;
import com.smmisia.shop.request.OrderConfirmRequest;
import com.smmisia.shop.request.OrderTimeoutRequest;
import com.smmisia.shop.response.OrderResponse;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;


public interface TradeOrderService extends IService<TradeOrder> {


    Result<OrderStreamDTO> buy(@Valid BuyParam buyParam);

    Result<TradeOrderVO> orderList(Integer pageNum, Integer pageSize);

    Result<Boolean> cancel(CancelParam cancelParam);

    OrderResponse cancel(OrderCancelRequest request);

    OrderResponse timeout(OrderTimeoutRequest request);

    OrderResponse confirm(OrderConfirmRequest request);

    Result<TradeOrderVO> orderDetail(@NotNull String orderId);

    Boolean SendMessageForClose(BaseOrderUpdateRequest request);
}
